import React, { useState } from "react";

const Toggle: React.FC = () => {
  const [isOn, setIsOn] = useState(false);

  return (
    <button
      onClick={() => {
        setIsOn(!isOn);
      }}
    >
      {isOn ? "开" : "关"}
    </button>
  );
};
export default Toggle;
